<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\OrderGoods
 *
 * @property int $id
 * @property int|null $good_id 订单商品表
 * @property string|null $good_object
 * @property int|null $order_pay_id 支付订单id
 * @property string|null $created_at
 * @property string|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderGoods whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderGoods whereGoodId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderGoods whereGoodObject($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderGoods whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderGoods whereOrderPayId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderGoods whereUpdatedAt($value)
 * @mixin \Eloquent
 * @property int|null $buy_num
 * @property float|null $good_price 商品价格
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderGoods whereBuyNum($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\OrderGoods whereGoodPrice($value)
 */
class OrderGoods extends Model
{
    protected $table='order_pay_goods';
    public $timestamps=null;
    protected $fillable=['goods_id','good_object','order_pay_id'];

    public function getGoodObjectAttribute($pictures){
        return  json_decode($pictures, true);
    }
}
